package com.hackintosh.prototype.pattern.graph;

/**
 * @description：用带原型管理器的原型模式来生成包含“圆”和“正方形”等图形的原型，并计算其面积
 * @author：twislyn
 * @date：Created in 2021/05/06
 * @modified By：
 * @version: 1.0
 */
public class ProtoTypeShape {

    public static void main(String[] args) {
        ProtoTypeManager protoTypeManager = new ProtoTypeManager();
        Shape obj1 = protoTypeManager.getShape("Circle");
        obj1.countArea();
        Shape obj2 = protoTypeManager.getShape("Square");
        obj2.countArea();
    }
}
